<template>
  <div class="index-wrapper scroll-box card-box">
    <el-tabs v-model="activeName"
             type="card"
             @tab-click="handleClick">
      <el-tab-pane label="手工提现"
                   name="first">
        <manual-withdrawal :isrefresh='isrefresh' />
      </el-tab-pane>
      <el-tab-pane label="自动提现"
                   name="second">
        <automatic-withdrawal :isrefresh='isrefresh' />
      </el-tab-pane>
    </el-tabs>
    <div style="position: absolute;top: 10px;right: 10px;">
      <el-button type="primary" @click="withdrawalSet">提现设置</el-button>
    </div>
    <template slot="footer">
      <el-button @click="visible = false">{{ $t('cancel') }}</el-button>
    </template>
    <withdrawal-set ref="withdrawalSetDialog" @callBack="isrefresh = true" />
  </div>
</template>

<script>
import mixinViewModule from '@/mixins/view-module'
import formValidate from '@/mixins/form-validate'
import AutomaticWithdrawal from './automatic-withdrawal.vue'
import ManualWithdrawal from './manual-withdrawal.vue'
import WithdrawalSet from './withdrawal-set.vue'
export default {
  mixins: [mixinViewModule, formValidate],
  data () {
    return {
      visible: false,
      activeName: 'first',
      isrefresh: false
    }
  },
  components: { AutomaticWithdrawal, ManualWithdrawal, WithdrawalSet },
  computed: {},
  methods: {
    init () {
      this.visible = true
    },
    handleClick (tab, event) {
      console.log(tab, event)
    },
    withdrawalSet () {
      this.openDialog('withdrawalSetDialog')
    }
  }
}
</script>
<style lang="scss" scoped>
::deep .el-tabs__content {
  min-height: 74.38vh;
  max-height: 100vh;
}
</style>
